<?php

require_once 'common/conn.php';
$usercode = $_GET['usercode'];
if (!isset($usercode)) {
    $usercode = $_POST['usercode'];
}
if (isset($_GET['start'])) {
    $start = $_GET['start'];
} else {
    $start = 0;
}
if (isset($_GET['limit'])) {
    $limit = $_GET['limit'];
}
$data = array();
if (is_numeric($start) && is_numeric($limit)) {
    $db = new DBC();
    $sql = "SELECT * FROM t_achieve_record ORDER BY createTime DESC LIMIT " . $start . "," . $limit;
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>